from load import*

class RandPlayer:
    def __init__(self, n):
        self.n = n
        self.cards = 0
        self.totalTerrs = 0
        self.totalArmies = 0

    def deployTo(self, game, numarms):
        board = game.getBoard()
        mine = []
        for tet, (p, n) in board.iteritems():
            if self.n == p:
                mine.append(tet)
        deploy = []
        for i in range(numarms):
            depTet = random.choice(mine)
            deploy.append(depTet)
        return deploy                

#p.deployTo(game, drafted)#returns a list of of countries as long as drafted for placement
            # needs assert to check that a player is not attack themselves
            # needs assert that territors are neighbors


#p.isAttacking(game) != None
#troopMovement:#troopMovement returns a true if the player wishes to move armies amoung their territories
#test
#p = RandPlayer(0)
#p1 = RandPlayer(1)

